﻿///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Feb  6 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "DBTool_GUI.h"

///////////////////////////////////////////////////////////////////////////

MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, ID_DEFAULT );
	m_menubar = new wxMenuBar( 0 );
	m_fileMenu = new wxMenu();
	wxMenuItem* fileOpen;
	fileOpen = new wxMenuItem( m_fileMenu, ID_FILE_OPEN, wxString( wxT("O&pen Database...") ) + wxT('\t') + wxT("Alt+F"), wxT("Open Database file."), wxITEM_NORMAL );
	m_fileMenu->Append( fileOpen );
	
	wxMenuItem* fileExit;
	fileExit = new wxMenuItem( m_fileMenu, ID_FILE_EXIT, wxString( wxT("E&xit") ) + wxT('\t') + wxT("Alt+F4"), wxT("Exit the application"), wxITEM_NORMAL );
	m_fileMenu->Append( fileExit );
	
	m_menubar->Append( m_fileMenu, wxT("&File") );
	
	m_helpMenu = new wxMenu();
	wxMenuItem* helpAbout;
	helpAbout = new wxMenuItem( m_helpMenu, ID_HELP_ABOUT, wxString( wxT("&About") ) + wxT('\t') + wxT("F1"), wxT("Show info about this application"), wxITEM_NORMAL );
	m_helpMenu->Append( helpAbout );
	
	m_menubar->Append( m_helpMenu, wxT("&Help") );
	
	this->SetMenuBar( m_menubar );
	
	
	this->Centre( wxBOTH );
}

MainFrame::~MainFrame()
{
}

MainPanel::MainPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer2;
	sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Database File Information") ), wxVERTICAL );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("DB File Name:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	bSizer6->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_txtDBFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	m_txtDBFileName->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
	
	bSizer6->Add( m_txtDBFileName, 1, wxALL|wxEXPAND, 5 );
	
	sbSizer2->Add( bSizer6, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer61;
	bSizer61 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText41 = new wxStaticText( this, wxID_ANY, wxT("Record Times:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText41->Wrap( -1 );
	bSizer61->Add( m_staticText41, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_txtDBRecTimes = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	m_txtDBRecTimes->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
	
	bSizer61->Add( m_txtDBRecTimes, 1, wxALL|wxEXPAND, 5 );
	
	m_staticText51 = new wxStaticText( this, wxID_ANY, wxT("Site:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText51->Wrap( -1 );
	bSizer61->Add( m_staticText51, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_txtDBTableType = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	m_txtDBTableType->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
	
	bSizer61->Add( m_txtDBTableType, 1, wxALL, 5 );
	
	sbSizer2->Add( bSizer61, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer611;
	bSizer611 = new wxBoxSizer( wxHORIZONTAL );
	
	m_listRecTimes = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT );
	bSizer611->Add( m_listRecTimes, 1, wxALL|wxEXPAND, 5 );
	
	sbSizer2->Add( bSizer611, 1, wxEXPAND, 5 );
	
	mainSizer->Add( sbSizer2, 1, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer21;
	sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Report Analytics") ), wxVERTICAL );
	
	wxBoxSizer* bSizer62;
	bSizer62 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_checkBox2 = new wxCheckBox( this, wxID_ANY, wxT("OS Resource"), wxDefaultPosition, wxDefaultSize, 0 );
	m_checkBox2->SetValue(true); 
	m_checkBox2->Enable( false );
	
	bSizer10->Add( m_checkBox2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_checkBox3 = new wxCheckBox( this, wxID_ANY, wxT("Tuxedo or WebLogic Resource"), wxDefaultPosition, wxDefaultSize, 0 );
	m_checkBox3->Enable( false );
	
	bSizer10->Add( m_checkBox3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	bSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_btnRun = new wxButton( this, wxID_ANY, wxT("Get!"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( m_btnRun, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizer62->Add( bSizer10, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText7 = new wxStaticText( this, wxID_ANY, wxT("Notes:\n1) Select one or more records(use CTRL select more as interval) from Record-List. \n2) Click Get! button."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	m_staticText7->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
	
	bSizer11->Add( m_staticText7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizer62->Add( bSizer11, 1, wxEXPAND, 5 );
	
	sbSizer21->Add( bSizer62, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer612;
	bSizer612 = new wxBoxSizer( wxHORIZONTAL );
	
	sbSizer21->Add( bSizer612, 0, wxEXPAND, 5 );
	
	mainSizer->Add( sbSizer21, 0, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	// Connect Events
	m_listRecTimes->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainPanel::OnListItemSelected ), NULL, this );
	m_btnRun->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnBtnRun ), NULL, this );
}

MainPanel::~MainPanel()
{
	// Disconnect Events
	m_listRecTimes->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainPanel::OnListItemSelected ), NULL, this );
	m_btnRun->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnBtnRun ), NULL, this );
}

AboutDlg::AboutDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* infoSizer;
	infoSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_icon = new wxStaticBitmap( this, ID_ABOUT_ICON, wxICON( amain ), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( m_icon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* textSizer;
	textSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staticAppName = new wxStaticText( this, ID_ABOUT_APPNAME, wxT("FusionSpy  DBTool"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticAppName->Wrap( -1 );
	m_staticAppName->SetFont( wxFont( 10, 70, 90, 92, false, wxT("Arial") ) );
	
	textSizer->Add( m_staticAppName, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_staticVersion = new wxStaticText( this, ID_ABOUT_VERSION, wxT("Version"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticVersion->Wrap( -1 );
	textSizer->Add( m_staticVersion, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	bSizer10->Add( textSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	infoSizer->Add( bSizer10, 1, 0, 5 );
	
	m_staticline1 = new wxStaticLine( this, ID_DEFAULT, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	infoSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
	
	m_staticCopyright = new wxStaticText( this, ID_ABOUT_COPYRIGHT, wxT("Copyright © 2008 - 2010 S && D"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
	m_staticCopyright->Wrap( -1 );
	infoSizer->Add( m_staticCopyright, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_hyperlink = new wxHyperlinkCtrl( this, wxID_ANY, wxT("www.fusionspy.com"), wxT("http://www.fusionspy.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
	infoSizer->Add( m_hyperlink, 0, wxALL|wxEXPAND, 5 );
	
	mainSizer->Add( infoSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
	
	m_aboutDialogButtonSizer = new wxStdDialogButtonSizer();
	m_aboutDialogButtonSizerOK = new wxButton( this, wxID_OK );
	m_aboutDialogButtonSizer->AddButton( m_aboutDialogButtonSizerOK );
	m_aboutDialogButtonSizer->Realize();
	mainSizer->Add( m_aboutDialogButtonSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
}

AboutDlg::~AboutDlg()
{
}
